package com.engineering.elink.videodao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.BaseCo;
import com.engineering.elink.domain.Video;
import com.engineering.elink.vo.ChapterVideoVo;
import com.engineering.elink.vo.CommentMeVideoVo;

public interface VideoMapper {
    int deleteByPrimaryKey(Integer videoId);

    int insert(Video record);

    int insertSelective(Video record);

    Video selectByPrimaryKey(Integer videoId);

    int updateByPrimaryKeySelective(Video record);

    int updateByPrimaryKey(Video record);
    
    List<Video> selectVideoByChapterId(@Param("chapterId") Integer chapterId,@Param("freeStatus") Integer freeStatus);
    
    List<CommentMeVideoVo> getCommentForMe(@Param("co") BaseCo co,@Param("userId") String userId);

    List<CommentMeVideoVo> getMyComment(@Param("co") BaseCo co,@Param("userId") String userId);
    
	List<Video> getBrowseVideo(@Param("co") BaseCo co);
	
	int selectCountBrowseVideo();
	
	Video selectDefaultOneVideo(@Param("chapterId") Integer chapterId,@Param("freeStatus") Integer freeStatus);
	
	List<Video> getSameVideo(@Param("co") BaseCo co,@Param("videoId") Integer videoId);
	
	Video selectVideoByType(@Param("videoId") Integer videoId,@Param("type") Integer type);
	
	Video selectByOssId(String ossId);
	
	int updateBatchByStatus(String[] videoIds);
	
	List<ChapterVideoVo> getList(Map<String,Object> map);
	
	int selectCountList(Map<String,Object> map);
	
}